package club.weiyuanstudio.android.app.message_station.api.data

data class Message(
    val id: Long,
    var nodeUUID: String,
    val senderNumber: String,
    val messageContent: String,
    val dateTime: String,
    val haveRead: Boolean
) {
    constructor(senderNumber: String, messageContent: String, receiveDate: String) : this(
        -1,
        "", //Todo: use local db uuid
        senderNumber,
        messageContent,
        receiveDate,
        false
    )

    constructor(
        nodeUUID: String,
        senderNumber: String,
        messageContent: String,
        receiveDate: String
    ) : this(
        -1,
        nodeUUID, //Todo: use local db uuid
        senderNumber,
        messageContent,
        receiveDate,
        false
    )

    override fun toString(): String {
        return "Message(id=$id, nodeUUID='$nodeUUID', senderNumber='$senderNumber', messageContent='$messageContent', dateTime='$dateTime', haveRead=$haveRead)"
    }
}